fix(dev): source watcher ignores the package build's .compile- scratch dir (red main) - #669
Merged
Merged
Conversation
…n the source watcher
🦋 Changeset detectedLatest commit: f8d40d9 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
commit: |
This was referenced Sep 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes red
main(Verify (integration-2)at7e56517756,route-invocation-dev-server.test.ts×2).Root cause
#656 made the package build compile into a second scratch sibling of the output root,
.<output>.compile-XXXXXX, beside the existing.<output>.stage-XXXXXX. Theagent-bundle devsource watcher (dev/watcher.ts,isOutputStagingPath) only knew the.stage-prefix, so the compile directory's creation and removal counted as a source change: everydist/package build inside the dev server invalidated and republished the epoch it had just produced (same source revision, new epoch id). Anything pinned to the first epoch — the parity fixtures' operator.env, an invocation queued against it — then ran under, or was compared against, the second one (operator: 'missing',pluginRootepoch mismatch).Fix
isOutputStagingPathrecognises both.<output>.stage-and.<output>.compile-.dev-watcher.test.tsemitsaddDir/add/unlinkDirfor a.dist.compile-XXXXXXtree and asserts no invalidation (red without the fix:failedTests: 1, the compile paths appear inpaths).Gates (local merge gate, AGENTS.md #662; branch =
origin/main7e56517756+ this commit)No website change (internal watcher rule). Changeset:
patch.Not fixed here
The same
mainrun also failsroute-register-typegen.test.ts("Type 'false' does not satisfy the constraint 'true'") and threeprepack.test.tscases (zod/vendoreddependency findings,document.files is not iterable) — these reproduce at45beb54792(#656) /7e56517756(#665) and are independent of this watcher rule; reported to their authors on #600.Self-review
Reviewer: Claude Fable 5.1 Thinking High (read-only, diff vs
origin/main). Findings: (1) prefix derivation matchespackage-build.ts:389-392/build.ts:695for nested and default outputs — VERIFIED; (2) no other in-root scratch directory left unhandled (node_modules/.agent-bundle-dts-and.agent-bundle/**are excluded by directory name) — VERIFIED; (3) a shared prefix helper is a reasonable follow-up, not a blocker for a hotfix — accepted; (4) changeset ended in the literal(#PR)— fixed to(#669). Verdict: MERGE.